﻿@model CustomerManagement.DataAccess.Customer

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>


@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset class="form-horizontal">
        <legend>Customer</legend>

        <div class="control-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Phone, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Phone)
                @Html.ValidationMessageFor(model => model.Phone, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Address, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Address)
                @Html.ValidationMessageFor(model => model.Address, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.AreaId, "AreaId", new { @class = "control-label" })
            <div class="controls">
                @Html.DropDownList("AreaId", String.Empty)
                @Html.ValidationMessageFor(model => model.AreaId, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.CustomerType, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.CustomerType)
                @Html.ValidationMessageFor(model => model.CustomerType, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="form-actions no-color">
            <input type="submit" value="Create" class="btn" />
        </div>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

